package routers

import (
	"github.com/gin-gonic/gin"
	"yukao1/controllers"
)

func Router(r *gin.Engine) {
	order := r.Group("/order")
	{
		order.POST("/create", controllers.CreateOrder)
		order.GET("/userid", controllers.GetUserIdOrder)
		order.GET("/list", controllers.GetOrderByGoodsName)
	}
	ws := r.Group("/ws")
	{
		ws.GET("/chat", controllers.ClientSocket)
	}
	file := r.Group("/file")
	{
		file.POST("/upload", controllers.UploadFile)
	}

}
